package com.hdax.dm.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hdax.dm.entity.order.OrderLinkUser;
import com.hdax.dm.mapper.order.OrderLinkUserMapper;
import com.hdax.dm.service.OrderLinkUserPService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrderLinkUserPServiceImpl extends ServiceImpl<OrderLinkUserMapper, OrderLinkUser> implements OrderLinkUserPService {

    @Override
    public Integer deleteOrderLinkUser(Long orderId) {
        QueryWrapper queryWrapper = new QueryWrapper();
        queryWrapper.eq("orderId",orderId);
        return baseMapper.delete(queryWrapper);
    }

    @Override
    public List<OrderLinkUser> findLinkUserByOrderId(Long id) {
        QueryWrapper queryWrapper = new QueryWrapper();
        queryWrapper.eq("orderId",id);
        return baseMapper.selectList(queryWrapper);
    }
}
